﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="Joyintech.Admin.inpiao365.general.templateincluding.index" %>

<%@ Register Src="~/checkRight.ascx" TagName="checkRight" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>包含文件管理</title>
</head>
<body>
    <form id="form1" runat="server">
    <div class="position">
        <span>包含文件管理</span>
    </div>
    <div class="searcher">
        <div class="tips">
            提示：包含文件在站点目录 include 中，模板中使用 #parse("/include/包含文件.html") 引用
        </div>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="fontR">
                    包含文件名称:<jui:HFTextBox ID="txtIncludeTemplateName" runat="server"></jui:HFTextBox>
                    &nbsp;
                    <jui:HFLinkButton runat="server" ID="btnSearch" CssClass="btn" OnClick="btnSearch_Click"><span><label class="search" for="btnSearch">查询</label></span></jui:HFLinkButton>
                    &nbsp;
                    <a class="btn" href="javascript:void(0);"><span onclick="opdg('')" style="cursor:hand;"><label class="add">新增</label></span></a></td>
            </tr>
        </table>
    </div>
    <div class="lister">
        <table border="0" cellpadding="0" cellspacing="1" width="100%" class="datatable">
            <tr class="head">
                <td class="fontC">
                    包含文件名称
                </td>
                <td class="fontC">
                    编码
                </td>
                <td style="width: 10%" class="fontC">
                    操作
                </td>
            </tr>
            <asp:Repeater ID="RepeaterList" runat="server">
                <ItemTemplate>
                    <tr class="row1" onmouseover="a=this.className;this.className='rowfocus';" onmouseout="this.className=a;a='';" ondblclick="opdg('<%# Eval("includeTemplateId").ToString()%>')">
                        <td class="fontL">
                            <%# Eval("IncludeTemplateName")%>
                        </td>
                        <td class="fontL">
                            <%# Eval("TemplateCharset")%>
                        </td>
                        <td style="width: 10%" class="fontC">
                            <%# "<span style='cursor:hand' onclick=\"opdg('" + Eval("includeTemplateId").ToString() + "')\">编辑</span>"%>&nbsp;&nbsp;<%# "<a target='_delete' href='delete.aspx?includeTemplate_Id=" + Eval("includeTemplateId") + "' onclick=\"return confirm('删除后无法恢复,确定要删除吗')\">删除</a>"%>
                        </td>
                    </tr>
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <tr class="row2" onmouseover="a=this.className;this.className='rowfocus';" onmouseout="this.className=a;a='';" ondblclick="opdg('<%# Eval("includeTemplateId").ToString()%>')">
                        <td class="fontL">
                            <%# Eval("IncludeTemplateName")%>
                        </td>
                        <td class="fontL">
                            <%# Eval("TemplateCharset")%>
                        </td>
                        <td style="width: 10%" class="fontC">
                            <%# "<span style='cursor:hand' onclick=\"opdg('" + Eval("includeTemplateId").ToString() + "')\">编辑</span>"%>&nbsp;&nbsp;<%# "<a target='_delete' href='delete.aspx?includeTemplate_Id=" + Eval("includeTemplateId") + "' onclick=\"return confirm('删除后无法恢复,确定要删除吗')\">删除</a>"%>
                        </td>
                    </tr>
                </AlternatingItemTemplate>
            </asp:Repeater>
            <%if (RepeaterList.Items.Count == 0)
              {%>
            <tr class="row1">
                <td colspan="3" align="center">
                    无符合条件的数据
                </td>
            </tr>
            <%}%>
            <tr class="pager">
                <td colspan="3">
                    <jui:SqlPager ID="SqlPager1" ControlToPaginate="RepeaterList" ItemsPerPage="10" PagingMode="NonCached"
                        runat="server" />
                </td>
            </tr>
        </table>
    </div>
    <iframe name="_delete" id="_delete" width="0" height="0"></iframe>
    <uc1:checkRight ID="checkRight1" runat="server" />
    
    </form>
</body>
</html>

<script language="javascript" type="text/javascript">
    function opdg(id) {
        var opwin = new J.dialog({ btnBar: false, id: id, title: '包含文件编辑', page: 'edit.aspx?includeTemplate_Id=' + id, cover: true, width: 600, height: 450, lockScroll: true, drag: false, cancelBtn: false });
        opwin.ShowDialog();
        opwin.maxSize();
    }
</script>
